package com.mls.guardian.config.helper;

import com.mls.guardian.common.FileUtil;
import com.mls.guardian.common.JsonUtil;

import java.io.IOException;
import java.util.Map;

/**
 * Created by jl on 15/10/21.
 */
public class JsonConfigHelper implements ConfigHandler {
    public Object encode(String jsonStr) {
        return JsonUtil.deserialize(jsonStr);
    }

    @Override
    public Object parse(String filePath) throws IOException {
        return encode(FileUtil.file2Str(filePath));
    }
}
